<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:replace="dashboard/header :: header"></head>
<body>

	<!--
@desc  添加
@author WeiXiaoJin
@since 2020-01-30 11:21:01
-->
	<div layout:fragment="content">
		<div class="container-fluid content-main">
			<div class="animated fadeIn">
				<div class="row">
					<!-- /.col-->
					<div class="col-sm-12">
						<div class="card">
							<div class="card-body">
								<form class="form-horizontal" id="addForm">
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">业务服务</label>
										<div class="col-md-9">
											<input class="form-control" id="business" type="text"
												name="business" placeholder="业务服务">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">服务Ip</label>
										<div class="col-md-9">
											<input class="form-control" id="serverIp" type="text"
												name="serverIp" placeholder="">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">端口</label>
										<div class="col-md-9">
											<input class="form-control" id="serverPort" type="text"
												name="serverPort" placeholder="">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">服务描述</label>
										<div class="col-md-9">
											<input class="form-control" id="serverDesc" type="text"
												name="serverDesc" placeholder="服务描述">
										</div>
									</div>
									
									<!-- 
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">重试次数</label>
										<div class="col-md-9">
											<input class="form-control" id="retrics" type="text" value="1" name="retrics" placeholder="重试次数">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">银行代码</label>
										<div class="col-md-9">
											<input class="form-control" id="bank" type="text" name="bank"
												placeholder="银行代码">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">所属接口</label>
										<div class="col-md-9">
											<input class="form-control" id="api" type="text" name="api"
												placeholder="所属接口">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">交易码</label>
										<div class="col-md-9">
											<input class="form-control" id="transaction" type="text"
												name="transaction" placeholder="交易码">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">接受IP</label>
										<div class="col-md-9">
											<input class="form-control" id="accessip" type="text"
												name="accessip" placeholder="接受IP">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">认证类型</label>
										<div class="col-md-9">
											<input class="form-control" id="authType" type="text"
												name="authType" placeholder="认证类型">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">客户端超时</label>
										<div class="col-md-9">
											<input class="form-control" id="clientOuttime" type="text"
												name="clientOuttime" placeholder="客户端超时">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">限制IP</label>
										<div class="col-md-9">
											<input class="form-control" id="denyip" type="text"
												name="denyip" placeholder="限制IP">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">加密方式</label>
										<div class="col-md-9">
											<input class="form-control" id="encType" type="text"
												name="encType" placeholder="加密方式">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">是否加密</label>
										<div class="col-md-9">
											<input class="form-control" id="hasEncryption" type="text"
												name="hasEncryption" placeholder="是否加密">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">是否熔断</label>
										<div class="col-md-9">
											<input class="form-control" id="hasHystrix" type="text"
												name="hasHystrix" placeholder="是否熔断">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">是否可访问</label>
										<div class="col-md-9">
											<input class="form-control" id="hasOpen" type="text"
												name="hasOpen" placeholder="是否可访问">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">熔断器内容</label>
										<div class="col-md-9">
											<input class="form-control" id="hystrixContent" type="text"
												name="hystrixContent" placeholder="熔断器内容">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">限流</label>
										<div class="col-md-9">
											<input class="form-control" id="limitRequest" type="text"
												name="limitRequest" placeholder="限流">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">服务端超时时间</label>
										<div class="col-md-9">
											<input class="form-control" id="serverOuttime" type="text"
												name="serverOuttime" placeholder="服务端超时时间">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">禁止关闭时间</label>
										<div class="col-md-9">
											<div class="input-group date">
												<span class="input-group-addon"><i
													class="fa fa-calendar"></i></span> <input type="text"
													class="form-control time-input" id="closeTime-3"
													name="closeTime" data-type="datetime"
													data-format="yyyy-MM-dd HH:mm:ss"
													placeholder="yyyy-MM-dd HH:mm:ss" lay-key="closeTime-3">
											</div>
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">解密代码</label>
										<div class="col-md-9">
											<input class="form-control" id="decodeStr" type="text"
												name="decodeStr" placeholder="解密代码">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">全局头部</label>
										<div class="col-md-9">
											<input class="form-control" id="globalHeader" type="text"
												name="globalHeader" placeholder="全局头部">
										</div>
									</div>
									<div class="form-group row">
										<label class="col-md-2 col-form-label control-label"
											for="text-input">开始访问时间</label>
										<div class="col-md-9">
											<div class="input-group date">
												<span class="input-group-addon"><i
													class="fa fa-calendar"></i></span> <input type="text"
													class="form-control time-input" id="openTime-3"
													name="openTime" data-type="datetime"
													data-format="yyyy-MM-dd HH:mm:ss"
													placeholder="yyyy-MM-dd HH:mm:ss" lay-key="openTime-3">
											</div>
										</div>
									</div>
									-->
									
								</form>
							</div>
						</div>
					</div>
					<!-- /.col-->
				</div>
			</div>
		</div>

	</div>

	<footer th:replace="dashboard/footer :: footer"></footer>

	<script type="text/javascript">
		var addForm = $("#addForm");
		$(function() {
			addForm.validate({
				ignore : [],
				rules : {
					business : {
						required : true
					},
					serverDesc : {
						required : true
					},
					serverIp : {
						required : true
					},
					serverPort : {
						required : true , 
						number: true
					}
				}
			});
		});

		function submitHandler() {
			var result = $.validate.form("addForm");
			if (result) {
				var saveUrl = ctx + "gateway/admin/gateBusinessServer/save";
				$.operate.save(saveUrl, addForm.serialize());
			}
		}
	</script>

</body>
</html>


